{{Strip}}
{{Extend "base"}}
{{Block "description"}}{{"Nging账号注册"|$.T}}{{/Block}}
{{Block "title"}}{{"Nging账号注册"|$.T}}{{/Block}}
{{Block "themeColor"}}#26262E{{/Block}}
{{Block "bodyAttr"}} class="texture"{{/Block}}
{{Block "main"}}{{$data := $.Stored.data}}
<div id="cl-wrapper" class="sign-up-container">
	<div class="middle-sign-up">
		<div class="block-flat">
			<div class="header">
				<h3 class="text-center"><img class="logo-img logo-img-sm" src="{{AssetsURL}}/images/logo.png" alt="logo"/> {{"账号注册"|$.T}}</h3>
			</div>
			<div>
				<form style="margin-bottom: 0px !important;" data-secret="{{SM2PublicKey}}:{{call $.Func.EnvKey}}" id="register-form" class="form-horizontal" action="" data-parsley-validate novalidate method="POST">
					<div class="content">
							<div class="form-group">
								<div class="col-sm-12">
									<div class="input-group">
										<span class="input-group-addon"><i class="fa fa-code"></i></span>
										<input type="text" name="invitationCode" data-parsley-trigger="change" data-parsley-errors-container="#invitationCode-error" required data-toggle="tooltip" title="{{`邀请码`|$.T}}" placeholder="{{`邀请码`|$.T}}" class="form-control" autocomplete="off" value="{{$data.InvitationCode}}">
									</div>
                                    <div id="invitationCode-error"></div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-12">
									<div class="input-group">
										<span class="input-group-addon"><i class="fa fa-user"></i></span>
										<input type="text" name="username" data-parsley-trigger="change" data-parsley-errors-container="#username-error" required data-toggle="tooltip" title="{{`用户名`|$.T}}" placeholder="{{`用户名`|$.T}}" class="form-control" autocomplete="off" value="{{$data.Username}}">
									</div>
                                    <div id="username-error"></div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-6 col-xs-6">
									<div class="input-group">
										<span class="input-group-addon"><i class="fa fa-lock"></i></span>
										<input id="pass1" type="password" name="password" data-parsley-errors-container="#password-error" placeholder="{{`密码`|$.T}}" required data-toggle="tooltip" title="{{`密码`|$.T}}" class="form-control" autocomplete="off" value="{{$data.Password}}">
									</div>
                                    <div id="password-error"></div>
								</div>
								<div class="col-sm-6 col-xs-6">
									<div class="input-group">
										<span class="input-group-addon"><i class="fa fa-lock"></i></span>
										<input data-parsley-equalto="#pass1" type="password" data-parsley-errors-container="#confirmation-error" name="confirmationPassword" required data-toggle="tooltip" title="{{`确认密码`|$.T}}" placeholder="{{`确认密码`|$.T}}" class="form-control" autocomplete="off" value="{{$data.ConfirmationPassword}}">
									</div>
                                    <div id="confirmation-error"></div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-12">
									<div class="input-group">
										<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
										<input type="email" name="email" data-parsley-trigger="change" data-parsley-errors-container="#email-error" required data-toggle="tooltip" title="E-mail" placeholder="E-mail" class="form-control" autocomplete="off" value="{{$data.Email}}">
									</div>
									<div id="email-error"></div>
								</div>
							</div>
             <!--<p class="spacer">By creating an account, you agree with the <a href="#">Terms</a> and <a href="#">Conditions</a>.</p>-->
            <button class="btn btn-block btn-success btn-rad btn-lg" type="submit">{{"注册"|$.T}}</button>
            <p class="text-center">Or</p>
            <a class="btn btn-block btn-default btn-rad btn-lg" href="{{BackendURL}}/login">{{"登录"|$.T}}</a>
					</div>
			  </form>
			</div>
		</div>
		<div class="text-center out-links"><a href="{{OfficialHomepage}}" target="_blank">&copy; {{Now.Year}} {{Version}}</a></div>
	</div>

</div>
{{/Block}}
{{Block "footer"}}
<script type="text/javascript" src="{{AssetsURL}}/js/jquery.parsley/parsley.min.js?t={{BuildTime}}"></script>
<script type="text/javascript" src="{{AssetsURL}}/js/jquery.parsley/i18n/{{$.Lang.Format false `_`}}.js?t={{BuildTime}}" charset="utf-8"></script>
<script type="text/javascript" src="{{AssetsURL}}/js/crypto/crypto-js.min.js?t={{BuildTime}}"></script>
<script type="text/javascript" src="{{AssetsURL}}/js/crypto/sm2.min.js?t={{BuildTime}}"></script>
<script type="text/javascript" src="{{AssetsURL}}/js/crypto/helper.min.js?t={{BuildTime}}"></script>
<script type="text/javascript">
$(function(){
$('[data-toggle="tooltip"]').tooltip();
submitEncryptedData('#register-form');
});
</script>
{{/Block}}
{{/Strip}}